{# Copyright The IETF Trust 2015, All Rights Reserved #}
{% load origin %}
{% origin %}
{% load ietf_filters ballot_icon person_filters textfilters %}
<div class="card mb-3">
    <div class="position-absolute top-0 end-0 m-3">{% ballot_icon doc %}</div>
    <div class="card-body">
        {% with doc.conflictdoc as conflictdoc %}
            <div class="row">
                <div class="col-3 text-end fw-bold">Conflict review</div>
                <div class="col pe-5 me-5">
                    <div class="fw-bold">{{ doc.title }}</div>
                    <a href="{{ doc.get_href }}" aria-label="Content"><i class="bi bi-file-earmark-fill"></i></a>
                    <a href="{% url "ietf.doc.views_doc.document_main" name=doc.name %}">{{ doc.name }}</a>
                </div>
            </div>
            <div class="row">
                <div class="col-3 text-end fw-bold">{{ conflictdoc.stream }} {{ conflictdoc.intended_std_level }}</div>
                <div class="col">
                    <div class="fw-bold">{{ conflictdoc.title }}</div>
                    <a href="{{ settings.IETF_ID_ARCHIVE_URL }}{{ conflictdoc.name }}-{{ conflictdoc.rev }}.txt" aria-label="Content">
                        <i class="bi bi-file-earmark-fill"></i>
                    </a>
                    <a href="{% url "ietf.doc.views_doc.document_main" name=conflictdoc.name %}">{{ conflictdoc.name }}</a>
                </div>
            </div>
            {% if conflictdoc.note %}
                <div class="row">
                    <div class="col-3 text-end fw-bold">Note</div>
                    <div class="col">{{ conflictdoc.note|urlize_ietf_docs|linkify|linebreaksbr }}</div>
                </div>
            {% endif %}
            <div class="row">
                <div class="col-3 text-end fw-bold">Token</div>
                <div class="col">{% person_link doc.ad %}</div>
            </div>
            {% with doc.active_defer_event as defer %}
                {% if defer %}
                    <div class="row">
                        <div class="col-3 text-end fw-bold">Deferred by</div>
                        <div class="col">{{ defer.by }} on {{ defer.time|date:"Y-m-d" }}</div>
                    </div>
                {% endif %}
            {% endwith %}
            {% if conflictdoc.ipr %}
                <div class="row">
                    <div class="col-3 text-end fw-bold">IPR</div>
                    <div class="col">
                        {% for ipr in conflictdoc.ipr %}
                            {% if ipr.disclosure.state_id == "posted" %}
                                <div>
                                    <a href="{% url 'ietf.ipr.views.show' id=ipr.disclosure.id %}">{{ ipr.disclosure.title }}</a>
                                </div>
                            {% endif %}
                        {% endfor %}
                    </div>
                </div>
            {% endif %}
        {% endwith %}
    </div>
</div>